<template>
  <div>
    <CategorySelector :disabled="!isShowList" />
    <attrList v-if="isShowList" ref="childBox" @showAttrList="shiftShowList" />
    <AddOrUpdate v-else @showAttrList="shiftShowList" />
  </div>
</template>

<script>
import CategorySelector from '@/components/CategorySelect/index'
import attrList from './components/AttrList'
import AddOrUpdate from './components/AddOrUpdate.vue'

export default {
  name: 'Attr',
  components: {
    CategorySelector,
    attrList,
    AddOrUpdate
  },
  data() {
    return {
      isShowList: true
    }
  },
  methods: {
    shiftShowList(val) {
      this.isShowList = val
    }
  }
}
</script>

<style lang="less" scoped>
</style>
